(define-macro (travel dat-list op-type var-list . body)
  (let ((dat (nth 0 dat-list))
	(n (if (null? (nth 1 dat-list)) 0 (nth 1 dat-list)))
	(step (if (null? (nth 2 dat-list)) 1 (nth 2 dat-list)))
	(dat-num (length dat-list))
	(i (nth 0 var-list))
	(e (if (null? (nth 1 var-list)) 'e (nth 1 var-list)))
	(var-num (length var-list))
	(len (gensym))
	(tr-var (gensym))
	)
    ;;(y-or-n "dat-num=~a,var-num=~a\n" dat-num var-num)
    `(cond
      ((or (eq? ,op-type '针对每组索引子项)(eq? ,op-type 'for-index-item))
       (cond
	((string? ,dat)
	 (cond
	  ((and (= ,var-num 2)(>= ,dat-num 1)(<= ,dat-num 3))
	  
	   (let ((,len (string-length ,dat)))
	     (do ((,i ,n (+ ,i ,step)))
		 ((if (> ,step 0) (>= ,i ,len) (< ,i 0)) ,i)
	       (let ((,e (string-ref ,dat ,i)))
		 ,@body)
	       )))
	  (else (display "错误提示(字符串)(索引子项)：参数数量不合法。（3>=数据列表>=1)(引导变量列表=2）")
		)))
	((list? ,dat)
	 (cond
	  ((and (= ,var-num 2)(>= ,dat-num 1)(<= ,dat-num 3))
	  
	   (let ((,len (length ,dat)))
	     (do ((,i ,n (+ ,i ,step)))
		 ((if (> ,step 0) (>= ,i ,len) (< ,i 0)) ,i)
	       (let ((,e (list-ref ,dat ,i)))
		 ,@body)
	       )))
	  (else (display "错误提示(列表)(索引子项)：参数数量不合法。（3>=数据列表>=1)(引导变量列表=2）")
		)))
	(else (display "错误提示(索引子项)：参数类型不合法。数据只能是字符串或列表。")
	      )))
      ((or (eq? ,op-type '针对每个索引)(eq? ,op-type 'for-index))
       (cond
	((string? ,dat)
	 (cond
	  ((and (= ,var-num 1)(>= ,dat-num 1)(<= ,dat-num 3))
	   
	   (let ((,len (string-length ,dat)))
	     (do ((,i ,n (+ ,i ,step)))
		 ((if (> ,step 0) (>= ,i ,len) (< ,i 0)) ,i)
	       ,@body)
	     ))
	  (else (display "错误提示(字符串)(索引)：参数数量不合法。（3>=数据列表>=1)(引导变量列表=1）")
		)))
	((list? ,dat)
	  (cond
	  ((and (= ,var-num 1)(>= ,dat-num 1)(<= ,dat-num 3))
	  
	   (let ((,len (length ,dat)))
	     (do ((,i ,n (+ ,i ,step)))
		 ((if (> ,step 0) (>= ,i ,len) (< ,i 0)) ,i)
	      
		 ,@body)
	       ))
	  (else (display "错误提示(列表)(索引)：参数数量不合法。（3>=数据列表>=1)(引导变量列表=1）")
		)))
	((integer? ,dat)
	  (cond
	  ((and (= ,var-num 1)(>= ,dat-num 1)(<= ,dat-num 3))
	   
	   (do ((,i ,n (+ ,i ,step)))
		 ((if (> ,step 0) (>= ,i ,dat) (< ,i 0)) ,i)
	      
		 ,@body)
	       )
	  (else (display "错误提示(整数)(索引)：参数数量不合法。（3>=数据列表>=1)(引导变量列表=1）")
		)))
	(else (display "错误提示(索引)：参数类型不合法。数据只能是字符串或列表或整数。")
	      )))
      ((or (eq? ,op-type '针对每个子项)(eq? ,op-type 'for-item))
       (cond
	((string? ,dat)
	 (cond
	  ((and (= ,var-num 1)(>= ,dat-num 1)(<= ,dat-num 3))
	   
	   (let ((,len (string-length ,dat)))
	     (do ((,tr-var ,n (+ ,tr-var ,step)))
		 ((if (> ,step 0) (>= ,tr-var ,len) (< ,tr-var 0)) ,tr-var)
	       (let ((,i (string-ref ,dat ,tr-var)))
	       ,@body)
	     )))
	  (else (display "错误提示(字符串)(索引)：参数数量不合法。（3>=数据列表>=1)(引导变量列表=1）")
		)))
	((list? ,dat)
	  (cond
	  ((and (= ,var-num 1)(>= ,dat-num 1)(<= ,dat-num 3))
	  
	   (let ((,len (length ,dat)))
	     (do ((,tr-var ,n (+ ,tr-var ,step)))
		 ((if (> ,step 0) (>= ,tr-var ,len) (< ,tr-var 0)) ,tr-var)
	       (let ((,i (list-ref ,dat ,tr-var)))
	      
		 ,@body)
	       )))
	  (else (display "错误提示(列表)(索引)：参数数量不合法。（3>=数据列表>=1)(引导变量列表=1）")
		)))
	((integer? ,dat)
	  (cond
	  ((and (= ,var-num 1)(>= ,dat-num 1)(<= ,dat-num 3))
	   
	   (do ((,i ,n (+ ,i ,step)))
		 ((if (> ,step 0) (>= ,i ,dat) (< ,i ,dat)) ,i)
	      
		 ,@body)
	       )
	  (else (display "错误提示(整数)(索引)：参数数量不合法。（3>=数据列表>=1)(引导变量列表=1）")
		)))
	(else (display "错误提示(索引)：参数类型不合法。数据只能是字符串或列表或整数。")
	      )))
      ((or (eq? ,op-type '针对每个元素)(eq? ,op-type 'for-atom))
       (travel-list ,dat ,i ,@body))
      (else (display "错误提示0：遍历类型不合法。只能是for-index-item,for-index,for-item,for-atom。"))
      )))
		 


	 
	  
